<div class="title"><?php echo $pageTitle ?></div>
<hr />
<div id="form_entry_lokasi_action">
<form action="<?php echo site_url("master/edit_regional/".$edit_page); ?>" method="post">
<table width="100%">
<?
        switch ($edit_page) {
            case "reg" :
							
?>
<input type="hidden" name="id" value="<?=$regobj->id?>"/>
    <tr>
        <td align="right" width="110">Kode :</td><td><input type="text" name="code" value="<?=$regobj->code?>"/></td>        
    </tr>
    <tr>
        <td align="right">Nama Region :</td><td><input type="text" name="display_name" value="<?=$regobj->display_name?>"/></td>        
    </tr>
    <tr>
        <td align="right">Summary :</td><td><textarea name="summary" cols="30" rows="10"><?=$regobj->summary?></textarea></td>       
    </tr>
    <tr>
        <td align="right">Latitude :</td><td><input type="text" name="latitude" value="<?=$regobj->latitude?>"/></td>        
    </tr>
    <tr>
        <td align="right">Longlatitude :</td><td><input type="text" name="longlatitude" value="<?=$regobj->longlatitude?>"/></td>        
    </tr>
<?
                break;
            case "prov" :
?>
<input type="hidden" name="id" value="<?=$regobj->id?>"/>
    <tr>
        <td align="right" width="120">Kode Propinsi :</td><td><input type="text" name="code" value="<?=$regobj->code?>"/></td>        
    </tr>
    <tr>
        <td align="right">Nama Propinsi :</td><td><input type="text" name="display_name" value="<?=$regobj->display_name?>"/></td>        
    </tr>
    <tr>
        <td align="right">Region :</td><td>
            <select name="region_id">
            	<option value=""> Pilih Region </option>
                <? foreach ($arrayreg as $row){ if($row->code == $regobj->region_id){?>
                <option value="<?=$row->code; ?>" selected="selected"> <?=$row->display_name; ?> </option>
                <? }else{ ?>
                <option value="<?=$row->code; ?>" > <?=$row->display_name; ?> </option>
                <? }} ?>
            </select>
		</td>        
    </tr>    
    <tr>
        <td align="right">Summary :</td><td><textarea name="summary" cols="30" rows="10"><?=$regobj->summary?></textarea></td>       
    </tr>
    <tr>
        <td align="right">Latitude :</td><td><input type="text" name="latitude" value="<?=$regobj->latitude?>"/></td>        
    </tr>
    <tr>
        <td align="right">Longlatitude :</td><td><input type="text" name="longlatitude" value="<?=$regobj->longlatitude?>"/></td>        
    </tr>     
<?			
				break;
            case "kab" :
?>
<input type="hidden" name="id" value="<?=$regobj->id?>"/>

    <tr>
        <td align="right" width="200">Kode Kabupaten :</td><td><input type="text" name="code" value="<?=$regobj->code?>"/></td>        
    </tr>
    <tr>
        <td align="right">Nama Kabupaten :</td><td><input type="text" name="display_name" value="<?=$regobj->display_name?>"/></td>        
    </tr>
    <tr>
        <td align="right">Propinsi :</td><td>
            <select name="provinsi_id">
            	<option value=""> Pilih Propinsi </option>
                <? foreach ($arrayreg as $row){ if($row->code == $regobj->provinsi_id ){?>
                <option value="<?=$row->code; ?>" selected="selected"> <?=$row->display_name; ?> </option>
                <? }else{ ?>
                <option value="<?=$row->code; ?>" > <?=$row->display_name; ?> </option>
                <? }} ?>
            </select>
		</td>        
    </tr>
    <tr>
        <td align="right">Tertinggal 158 :</td><td>
            <select name="is_tertinggal">
            	<option value="0"> Pilih </option>
                <? if($regobj->is_tertinggal == 0){?>
                <option value="0" selected="selected"> Tidak </option>
                <option value="1"> Ya </option>
                <? }else{ ?>
                <option value="0"> Tidak </option>
                <option value="1" selected="selected"> Ya </option>
                <? } ?>
            </select>
		</td>        
    </tr>
    <tr>
        <td align="right">Tertinggal 84 :</td><td>
            <select name="is_tertinggal84">
            	<option value="0"> Pilih </option>
                <? if($regobj->is_tertinggal84 == 0){?>
                <option value="0" selected="selected"> Tidak </option>
                <option value="2"> Ya </option>
                <? }else{ ?>
                <option value="0"> Tidak </option>
                <option value="2" selected="selected"> Ya </option>
                <? } ?>
            </select>
		</td>        
    </tr>              
    <tr>
        <td align="right">Summary :</td><td><textarea name="summary" cols="30" rows="10"><?=$regobj->summary?></textarea></td>       
    </tr>
    <tr>
        <td align="right">Latitude :</td><td><input type="text" name="latitude" value="<?=$regobj->latitude?>"/></td>        
    </tr>
    <tr>
        <td align="right">Longlatitude :</td><td><input type="text" name="longlatitude" value="<?=$regobj->longlatitude?>"/></td>        
    </tr>     
<?			
				break;
            case "kec" :
?>
<input type="hidden" name="id" value="<?=$regobj->id?>"/>
    <tr>
        <td align="right" width="120">Kode Kecamatan :</td><td><input type="text" name="code" value="<?=$regobj->code?>"/></td>        
    </tr>
    <tr>
        <td align="right">Nama Kecamatan :</td><td><input type="text" name="display_name" value="<?=$regobj->display_name?>"/></td>        
    </tr>
    <tr>
        <td align="right">Kabupaten :</td><td>
            <select name="kabupaten_id">
            	<option value=""> Pilih Kabupaten </option>
                <? foreach ($arrayreg as $row){ if($row->code == $regobj->kabupaten_id ){?>
                <option value="<?=$row->code; ?>" selected="selected"> <?=$row->display_name; ?> </option>
                <? }else{ ?>
                <option value="<?=$row->code; ?>" > <?=$row->display_name; ?> </option>
                <? }} ?>
            </select>
		</td>        
    </tr>    
    <tr>
        <td align="right">Summary :</td><td><textarea name="summary" cols="30" rows="10"><?=$regobj->summary?></textarea></td>       
    </tr>
    <tr>
        <td align="right">Latitude :</td><td><input type="text" name="latitude" value="<?=$regobj->latitude?>"/></td>        
    </tr>
    <tr>
        <td align="right">Longlatitude :</td><td><input type="text" name="longlatitude" value="<?=$regobj->longlatitude?>"/></td>        
    </tr>     
<?			
				break;
            case "desa" :
?>
<input type="hidden" name="id" value="<?=$regobj->id?>"/>
    <tr>
        <td align="right" width="120">Kode Desa :</td><td><input type="text" name="code" value="<?=$regobj->code?>"/></td>        
    </tr>
    <tr>
        <td align="right">Nama Desa :</td><td><input type="text" name="display_name" value="<?=$regobj->display_name?>"/></td>        
    </tr>
    <tr>
        <td align="right">Kecamatan :</td><td>
            <select name="kecamatan_id">
            	<option value=""> Pilih Kecamatan </option>
                <? foreach ($arrayreg as $row){ if($row->code == $regobj->kecamatan_id ){?>
                <option value="<?=$row->code; ?>" selected="selected"> <?=$row->display_name; ?> </option>
                <? }else{ ?>
                <option value="<?=$row->code; ?>" > <?=$row->display_name; ?> </option>
                <? }} ?>
            </select>
		</td>        
    </tr>    
    <tr>
        <td align="right">Summary :</td><td><textarea name="summary" cols="30" rows="10"><?=$regobj->summary?></textarea></td>       
    </tr>
    <tr>
        <td align="right">Latitude :</td><td><input type="text" name="latitude" value="<?=$regobj->latitude?>"/></td>        
    </tr>
    <tr>
        <td align="right">Longlatitude :</td><td><input type="text" name="longlatitude" value="<?=$regobj->longlatitude?>"/></td>        
    </tr>     
<?			
				break;
				
		
		}
?>
    <tr>
        <td align="right"></td><td><input type="submit" name="submit" value="submit"/></td>        
    </tr>               
</table>
</form>
</div>